﻿#region Includes
using System;
using System.Runtime.InteropServices;
#endregion

namespace GingerGL.Graphics.Models.MD3
{
    //------------------------------------------------------------//
    /// <summary>
    /// IDS MD3 VERTEX
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Ansi)]
    public struct MD3Vertex
    {
        //--------------------------------------------------------//
        #region Variables
        static public readonly int MD3_MAX_FRAMES = 4096;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
        public Int16[] Coordinate;                              //List of offset values into the list of Vertex objects that constitute the corners of the Triangle object. Vertex numbers are used instead of actual coordinates, as the coordinates are implicit in the Vertex object. The triangles have clockwise winding.
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
        public byte[] Normal;                                   //Zenith and azimuth angles of normal vector. 255 corresponds to 2 pi. See spherical coordinates.
        #endregion
        //--------------------------------------------------------//
    }
    //------------------------------------------------------------//
}
